package com.briup.estore.service.impl;

import com.briup.estore.common.utils.Query;
import com.briup.estore.common.utils.PageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.briup.estore.dao.BannerDao;
import com.briup.estore.entity.BannerEntity;
import com.briup.estore.service.BannerService;


@Service("bannerService")
public class BannerServiceImpl extends ServiceImpl<BannerDao, BannerEntity> implements BannerService {
@Autowired
private  BannerDao bannerDao;

    @Override
    //查询启用的轮播 并根据seq去排序
    public List<BannerEntity> findActive() {
        List<BannerEntity> list = bannerDao.selectList(new QueryWrapper<BannerEntity>().eq("active",true).orderByAsc("seq"));
        return list;
    }
}